package com.sqx.modules.userExtension.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.userExtension.entity.UserExtension;
import com.sqx.modules.userExtension.service.UserExtensionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/userExtension/")
@Api(value = "推广申请", tags = {"用户推广申请"})
public class AdminUserExtensionController {
    @Autowired
    UserExtensionService extensionService;

    @Login
    @ApiOperation("获取申请列表")
    @GetMapping("getExtensionList")
    public Result getExtensionList(Integer page, Integer limit, UserExtension userExtension) {
        return Result.success().put("data", extensionService.getExtensionList(page, limit, userExtension));
    }

    @Login
    @ApiOperation("审核")
    @PostMapping("examine")
    public Result examine(Integer status,Long extensionId, String remarks,String divideScale,String divideTwoScale) {
        return extensionService.examine(status,extensionId, remarks,divideScale,divideTwoScale);
    }

}
